import request from '@/utils/request'
import qs from 'qs'

export function getIntegralApi(id) {
  return request({
    url: `/integral/${id}`,
    method: 'get'
  })
}
export function getIntegralsApi(pageNo, pageSize, integral) {
  return request({
    url: `/integral?${qs.stringify(integral)}`,
    params:{
      pageNo: pageNo,
      pageSize: pageSize,
    },
    method: 'get'
  })
}
export function delIntegralApi(id) {
  return request({
    url: `/integral/${id}`,
    method: 'delete'
  })
}
export function delIntegralsApi(integrals) {
  return request({
    url: `/integral`,
    data:integrals,
    method: 'delete'
  })
}
export function updateIntegralApi(form) {
  return request({
    url: `/integral`,
    method: 'put',
    data:form,
  })
}
export function addIntegralApi(form) {
  return request({
    url: `/integral`,
    method: 'post',
    data:form,
  })
}